package com.zsrt.javaweb.ch01;


/**
 * bean  豆子
 * javaBean  咖啡豆 所有的对象的统称
 * @author zsrt
 *
 */
public class HelloWorld {
	
	
	private String name;
	
	private int age;
	
	

	//agee
	public void setAgee(int age) {
		this.age = age;
	}



	public void setName(String name) {
		this.name = name;
	}

	
	
	public String getName() {
		return name;
	}



	public HelloWorld(){
		System.out.println("调用了HelloWorld的默认的构造器用来创建HelloWorld类的对象");
		System.out.println("内存地址是："+ this);
	}
	
	
	
	
	
	public HelloWorld(String name) {
		super();
		this.name = name;
	}



	public int add(int x, int y){
		int sum = x + y;
		return sum;
		
	}
	
	
	
	

}
